Booster

Booster currently working with single core and stick with the original idea of node.js behaviour single thread

Configuration(Server)


   http:{
     base:{port:80,},
       socket:{flag:true,port:8081},
   },
   https:{
      flag:false,
      base:{
        port:443
      },
      certificate_path:"ssl_certificate",key:"localhost.com",certificate:"localhost.com",

      socket_server_bind_port:8081,

      socket:{
        flag:true,
        port:8081
      }
   },
          
Http & Https

Set socket flag true to use socket module

Configuration(Client)

Client side server no need any extra configuration

Initialize socket


jswalker_obj.booster({active:true},function(socket_op){
    console.log('Booster activate');
    /*Every Socket Prototype can be listed here*/
    socket_op.prototype.test=function(pick,notifier){
      console.log(op);
      notifier({notify:true});
    };
});
          

Note: jswalker_obj is standard object to access wir and booster module

active:

active flag tell booster module to activate socket and other parameter is discarded by the booster module if active flag passed.

Protoype

Every Booster activation block is place for booster prototype which is directly used for communication via server.



Call Protoype via booster with different flavour

Booster only single user(session based)


require("jswalker-booster").booster({
   system_op:system_op,
   io:system_op.io,
  sender:{
     proto:"test",
     ziel:{a:10}
  },
  notifier:function(pick){
    console.log("Notify by browser");
    console.log(pick);
  }
});
system_op

Pass system_op for get io object

sender(me)

current user by session

Notifierk

This is callback function when user call callback to respond server that getting data successfully this is optional






Booster group


require("jswalker-booster").booster({
   system_op:system_op,
   group:{
    name:"name_of_socket_group",
    proto:"prototype_name",
    ziel:{ziel_field:"ziel_value"}
    }
});
system_op

Pass system_op for get io object

group

Specify specific group via name of socket group and rest of parameter is same prototype name anf ziel data

Notifier

Notifier not support in group event

Note:
Group socket module may later add notifier feature to track
which user notifier(crucial for future situation : race condition)





Booster broadcast


require("jswalker-booster").booster({
   system_op:system_op,
   broadcast:{
    self:true,
    proto:"prototype_name",
    ziel:{ziel_field:"ziel_value"}
    }
});
system_op

Pass system_op for get io object

broadcast

All connected socket will recieve message

Notifier

Notifier not support in broadcast not in future too.

Note:
self is flag to send message sender or not