Business & Developer Benefits

The Business View :

If you are a software business developer, or a decision maker, etc facing the challenging task of concretizing a project idea, and first selecting the technology on which the final solution will be built, then you think twice about any decision and its possible long-term influence. You should care about avoiding two kind of bitterness that often occur when dealing with Internet software projects :
1. The bitterness of being passed over by a competition, which managed to succeed thanks to the adoption of the most recently succeeding and influencing technologies while you refused to assess its promise.
2. The even more bitterness of finding yourself in a puzzling, sub-optimal situation as your solution can’t move further because of inherit limitation in the technologies that it is based on and which result in high-level critical problems you were unable to foretell the day you were lured to select the basis for your application solution.
Because today, the prevailing technology is the Web, I then want you to concentrate on the second issue of the two aforementioned ones. Will the Web be totally fit for your solution ? I ask this question because the promise of Push Framework lies exactly on the very limitation aspects of the Web. In fact , what the web offers as a technology is only good for situations where we need to publish content and ensure the immediate easy deployment of changes incurred to it. The user only reacts to content. If he reacts with other users then its “reaction” is compiled into the content, persisted then shown to others when they request the content. Applications that need to broadcast information in real time, or applications that want to enable connected users to “engage” with each other in real time need a dedicated solution.
To a certain extent, RIA technologies such as Flex and Silverlight are trying to overcome this issue. However the solution brought bring divergent frameworks and components. or example,  Adobe’s offering requires the client side support of Flash. As for the server part you need to deploy Adobe LiveCycle Data Service plus a Server side dynamic technology able to handle the “event” sources and to distribute data to LiveCycle which does the real time publishing part. BlazeDS is the free and open source version of it but it deprives you from the high performance messaging feature, among other features.
Further more, nowadays things are getting much more confusing with the divergence brought by mobile devises. This is imposing the return to native applications which can access the devise interfaces more than the web browser can do or any embedded Applet in Flash or Silverlight) can do.
Using Push Framework, you are giving up the whole  idea to serv the UI by the server side. At that cost you can devise then deploy your server and be able to push data to thousands of connecting clients using one dedicated machine. Thanks to the feature of Multi-Protocol, you can have heteregenous devises talking to your server : PC- based desktop application, native mobile application, Browser-based  application (thanks to HTML5 WebSocket), etc. Push Framework also  allows you to monitor your server and the real time activity of your connected clients, using a rich Dashboard application offered for free !

The Developer View

Developers care about the complexities of the frameworks and libraries they use. Along with efficiency they weigth other factors such as the ease of use and clarity of the API. Efficiency can not be measured unless you concretely manipulate the library and roll up the sleeves. For that we offer you ready to examine tutorial use-case along with source code and results. Seeing some exerpts of code, you can already feel the general layout of things :

Program entry point :

int main()
{
        PushFramework::Server server;
	server.registerService(myserviceId1, new MyService1, "myservice1");
	server.registerService(myserviceId2, new MyService2, "myservice2");
	server.registerService(myserviceId3, new MyService3, "myservice3");
	server.setClientFactory(new MyClientFactory);
	server.setProtocol(new MyProtocol);
	server.setListeningPort(2010);
	server.enableRemoteMonitor(2011, 10, "alibaba");
 
	server.start(true);
	// interact with user to stop.
	server.stop();
	return 0;
}

Implementing Service1 class : receiving a request and sending a response to the same client.

MyService1: public PushFramework::Service
{
       void handle(PushFramework::LogicalConnection* pClient, PushFramework::IncomingPacket& request)
       {
              //Send data back to the same client.
              PushFramework::OutgoingPacket response;
              pClient->PushPacket(&response);
        }
 }

Implementing Service2 class : receiving a request from client A and sending a response to another client B.

MyService2: public PushFramework::Service
{
       void handle(PushFramework::LogicalConnection* pClient, PushFramework::IncomingPacket& request)
       {
              //Send data to another connected client :
              CLIENT_KEY destKey; //Probably to be guessed from request.
              PushFramework::LogicalConnection* pDestClient = FindClient(destKey);
              if(pDestClient)
              {
                   PushFramework::OutgoingPacket response;
                   pClient->PushPacket(&response);
                   ReturnClient(pDestClient);
              }
        }
 }

Implementing Service1 class : receiving a request and sending a response to a group of clients.

MyService3: public PushFramework::Service
{
       void handle(PushFramework::LogicalConnection* pClient, PushFramework::IncomingPacket& request)
       {
              //Broadcast data to a group of clients :
              PushFramework::OutgoingPacket* pResponse = new PushFramework::OutgoingPacket();
              broadcastManager.PushPacket("broadcastGroup1", pResponse);
        }
 }
Share