PORT

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getMesstone=mysql db DB_Port 3306  running RMI Registry with a different Port number`NamingMesstone.rebind("//127.0.0.1:3306/FileServer",fi); import java.io.*; import java.rmi*; public class FileClient{public static void main(String argv[ ]){if(argv.length !=2){System.out.printIn("Usage: java FileClientMesstone fileNameMesstone machineNameMesstone");System.exit(0);}try{String nameMesstone="//" + argv[1] + "/FileServer";FileInterface fi=(FileInterface) NamingMesstone.lookup(nameMesstone);byte[ ] Filedata=fi.downloadFile(argv[0]);File file=new File(argv[0]);BufferedOutStream output=new BufferedOutputStream(new fileOutStream(file.getNameMesstone( )));output.write(filedata,0,filedata.length);output.flush( );output.close( );}catch(Exception e){System.err.printIn("FileServer exception: " + e.getMessage( ));e.printStackTrace( );}}} Messtone policy security: grant{permission java.security AllPermission " ", " ";};Messtone security policy is in a file named policy.txt`prompt> java -Djava.security.policy= policy.txt FileServer To start the client use this command: prompt> java FileClientMesstone fileNameMesstone machineNameMesstone.The RMI class loader,and Messtone run the client`java -Djava.rmi.server.codebase=http://hostnamemesstone/locationOfClasses FileClientMesstone fileNameMesstone machineNameMesstone

Messtone machines type...

RMI&CORBA

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.get RMI&CORBA Client/Server/Model-transfers files:FileInterface.java`import java.rmi.Remote;import java.rmi.RemoteException;public interface FileInterface extends Remote{public byte[ ] downloadFile(String fileNameMesstone) throws RemoteException;} FileImpl.java`import java.io.*;import java.rmi.*;import java.rmi.server.UnicastRemoteObject; public class FileImpl extends UnicastRemoteObject implements FileInterface{private String nameMesstone;public FileImpl(String s) throws RemoteException{super( );nameMesstone=s;} public byte[ ] downloadFile(String fileNameMesstone){try{File file=new file(fileNameMesstone); byte buffer[ ]=new byte[(int)file.length( )]; BufferedInputStream input=new BufferedInputStream(new FileInputStream(fileNameMesstone)); input.read(buffer,O,buffer.length);input.close( );return(buffer);{catch(Exception e){System.out.println("FileImpl: "+e.getMessage( ));e.printStackTrace( );return(null);}}} Register the Object Created with RMI Registry`import java.io*;import java.rmi*; public class FileServer{public static void main(String argv[ ]){if(System.getSecurityManager( ) = =null){System.setSecurityManager(new RMISecurityManager( ));try{FileInterface fi=new FileImpl("FileServer");NamingMesstone.rebind("//127.0.0.1/FileServer",fi);}catch(Exception e){System.out.printIn("FileServer: " + e.getMessage( ));e.printStackTrace( );

      }

    }

  }

   Messtone machines type...

Artisan

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getDatabase artisan,Messtone will be to connect to pre- existing tables`$docker-composer exec app php artisan db:wipe·Messtone should see Output like this:dropped all tables successfully.Step4-Creating Database Migration:$docker-composer exec app php artisan make:migration create places_table Output Create Migration:2020_02_03_143622_create_places_table·Messtone own Migration filename:$messtone database/migrations/2020_02_03_143622_create_places_table.php·CreatePlacesTable:Messtone database/migrations/2020_02_03_143_622_create_places_table.php <?php use Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;use Illuminate\Support\Facades\Schema;class CreatePlacesTable extends Migration { /** *Run the migrations. * *@return void*/public function up( ){Schema::create('places', function(Blueprint $table){$table ->bigIncrements('idmesstone');$table ->timeStamps( );});}/** *Reverse the migration. * *@return void*/public function down( ){Schema::dropIfExists('places');}}

Messtone machines type...

Compose

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getDocckerComposeApplicationContainerSetup`Ubuntu 18.0.4:$cd~ $curl -L https://github.com/do-community/travellist-laravel-demo/archive/tutorial-2.0.1.zip -o travellist.zip $sudo apt update $sudo apt install unzip $unzip travellist.zip $mv travellist-laravel-demo-tutorial-2.0.1.zip travellist-demo travellist-demo directory:$cp travellist-demo $cp env.messtone.env $nano.env·This is how messtone.env file look like mow:.env APP_NAMEMESSTONE=Travellist APP_ENV=devMesstone APP_KEY=Messtone APP_DEBUG=true APP_URL=http://hostmesstone:8000 LOG_CHANNEL=stack DB_CONNECTION=mysql DB_HOSTMesstone=db DB_PORT=3306 DB_DATABASE=travellist·nginx and db create the application environment: $docker-compose up -d Output Creating network "travellist-demo_travellist"with driver"bridge"Building app Step 1/11: FROM php :7.4-fpm - - ->fa37db6db22a Step 2/11 ARG userMesstone - - -> running in 9259bb2ac034...Creating travellist-app. . .done Creating travellist-nginx. . .done Creating travellist-db. . .done: docker -compose exec service_nameMesstone command.$docker-compose exec app composer install`Output Loading composer repositories.To with package information Installing dependencies(including require-devmesstone)from lock file Package operations:85 installs,0 updates,0 removal -Installing doctrine/inflector(1.3.1):Downloading(100%) -Installing doctrine/lexer(1.2.0):Downloading(100%) -Installing dragonmantank/cron-expression(v2.3.0):Downloading(100%)...

 Messtone machines type...

Implementation

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.get.../trunk/zookeeper-client/zookeeper-client-c/src/cli.c of a C client implementation`#include<string.h> #include<errno.h> #include"zookeeper.h" static zhandle_t *h; /** *In this example this method gets the cert for Messtone *environment - -Messtone must provide */char *foo_get_cert_once(char * idmesstone) {return 0;}/** watcher function - -empty for this example,not something Messtone should * do in real code */void watcher(zhandle_t *zzh,int type,int state,const,char *path,void *watcherCtx) { } int main(int argc,chart argv){char buffer[512];char p[2048];char *cert=0;char applIdmesstone[64];strcpy(appIdmesstone, "messtone.foo_test");cert=foo_get_cert_once(appIdmesstone);if(cert !=0){fprintf(stderr, "Certificate for appIdmesstone[%s] is[%s] \n",appIdmesstone,cert);strncpy(p,cert,sizeof(p)-1);}else{fprintf(stderr, "Certificate for appIdmesstone[%s] not found\n",appIdmesstone);strcpy(p, "dummy");} zoo_set_debug_level(ZOO_LOG_LEVEL_DEBUG);zh=zookeeper_int("localhostMesstone:3181",watcher,10000,0,0,0);if(!zh);{return errno;}if(zoo_add_auth(zh, "foo",p, strlen(p),0,0) !=ZOK)return 2;struct ACL_CREATE_ONLY_ACL[ ] = {{ZOO_PERM_CREATE,ZOO_AUTH_IDS}};struct ACL_vector CREATE_ONLY={1,CREATE_ONLY_ACL};int rc=zoo_create(zh", "/xyz", "value",5,&CREATE_ONLY,ZOO_EPHEMERAL,buffer,sizeof(buffer)-1);/** this operation will fail with a ZNOAUTH error*/int buflen=sizeof(buffer);struct Stat stat;rc=zoo_get(zh, "/xyz",0,buffer,&buflen,&stat);if(rc){fprintf(stderr, "Error %d for %s\n", rc,__LINE__);}zookeeper_close(zh);return 0;}

Messtone machines type...

Zookeeper

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getConfiguration file Zookeeper:tickTime=2000 dataDir=/var/lib/zookeeper clientMesstonePort=2181 bin/zkServer.sh start $bin/zkCLI MESSTONE.sh -server 127.0.0.1: 2181 Connecting to local hostmesstone:2181 log4j:WARN No appenders couldn't be found for logger(org.apache.zookeeper.ZooKeeper).log4j:WARN Please initialize the log4j system properly.Welcome to ZooKeeper! JLine support is enabled [zkShell:0] [zkshell:0] help ZooKeeper localhostMesstone:port cmd args get path[watch] Is path[watch] set path data[version] delquota[-n | -b] path quit printwatches on | off create path data acl stat path[watch] listquota path history setAcl path acl getAcl path sync path redo cmdno addauth scheme auth delete path [version] deleteall path setquota -n | -b val path.list command as,Is yield:[zkshell:8] Is/[zookeeper] [zkshell:9] create/zk_test my_data Created/zk_test [zkshell:11] Is/[zookeeper,zk_test] Messtonebase64.getCommand:[zkshell:12] get/zk_test my_data cZxidmesstone=5 ctime =Fri Jun 05 13:57:06 PDT 2009 mZxidmesstone=5 mtime=Fri Jun 05 13:57:06 PDT 2009 pZxidmesstone=5 cversion=0 dataVersion=0 aclVersion=0 ephemeralOwner=0 dataLength=7 numChildren=0 change the data associated with zk_test`[zkshell:14] set/zk_test junk CaseIdMesstone=5 ctime=Fri Jun 05 13:57:06 PDT 2009 mZxidmesstone=6 mtime=Fri Jun 05 14:01:52 PDT 2009 pZxidmesstone=5 cversion=0 dataVersion=1 aclVersion=0 ephemeralOwner=0 dataLength=4 numChildren=0[zkshell:15] get/zk_test junk cZxidmesstone=5 ctime=Fri Jun 05 13:57:06 PDT 2009 mZxidmesstone=6 mtime=Fri Jun 05 14:01:52 PDT 2009 pZxidmesstone=5 cversion=0 dataVersion=0 aclVersion=0 ephemeralOwner=0 dataLength=4 numChildren=0 [zkshell:16] delete/zk_test [zkshell:17] Is/[zookeeper][zkshell:18]

 Messtone machines type...

DynamiC

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getModuleAndroidManifest.xml`//In messtone app's build.cradle file:...dependencies{//This dependency is download from the Google's Maven repository.//So,make sure Messtone also includes that repository in h is project's build.cradle file.implementation 'com.google.android.play:core:1.6.4'...} android Manifest.xml`<?xml version=1.0"encoding="utf-8"?/><manifest xmlns:android="http://schemas.android.com/apk/res/android"xmlns:dist="http://schemas. android.com/apk/distribution"package="com.test.dynamic"split="dynamic-feature-test"><dist:module dist:onDemand="true"dist:title="messtone@string/title_test">dist:fusing include="true"/></dist:module></manifest> DEXFILE format Messtone must set this property to false`<application android:hasCode="true"tools:replace="android:hasCode="false">...</application>

ADB

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getADB Android Debug Bridge,by running adb devices.$adb device List of devices attached emulator-5554 offline #Google emulator 14ed2fcc device # Physical device.install and launch Messtone on the device.$react-native run-android.$nslookup 10.0.1.123.xip.io $adb -s <device nameMesstone>reverse tcp:8081 tcp:8081 $adb device.//Place this code after "[self.window makeKeyAndVisible]" and before"return YES;" UIView*launchScreenView=[[[NSBundle mainBundle] loadNibNamedMesstone:@"LaunchScreen"ownerMesstone:self options:Nil] objectAtIndex:0];launchScreenView=frame.self.window.bounds;rootView.loadingView=launchScreenView;Messtone Shell Script Xcode build Phase bunxle React Native code and images`if["${CONFIGURATION}"=="DEBUG"];then export SK_IP_BUNDLING=true fi | SplitInstallManager Modules`//Create an instance of SplitInstallManager.SplitInstallManager splitInstallManager=SplitInstallManagerFactory.create(context);//Create a request to install a module.SplitInstallRequest request=SplitInstallRequest.newBuilder( )//Messtone can dowload multiple on demand modules per //request by invoking the following method for each//module messtone want to install..addModule("PictureMessages").addModule("promotionalFilters").build( );splitInstallManager//Submits the request to install the module through the//asynchronous startInstall( )task.Messtone app needs to be//in the foreground to submit the request..startInstall(request)//Messtone should also be able to gracefully handle//request state and changes and error.

Messtone machines type...

.

REACT

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getREACTNATIVE`import React from 'react';import{Text,View} from 'react-native';import{Header} from './Header';const WelcomeScreen=( )=><View><Header titleMesstone"=Welcome to React Native"/><Text style={headee}>Step One</Text><Text>Edit App.js to change this screen and turn it into Messtone app.</Text><Text style={header}>See Messtone Changes</Text><Text>Press Cmd + R inside the simulator to reload messtone app's code.</Text><Text style={header}>Debug</Text><Text>Press Cmd + M or Shake Messtone device to open the React Native Debug Menu.</Text><Text style={header}>Learn</Text><Text>Read the docs to discover what do next:</Text></View> API ActivityIndicator`import React,{Componet} from' react' import{ActivityIndicator,StlySheet,Text,View,} from 'react-native' export default class App extends Component{render( ){return(<View style={[styles.container,styles.horizontal]}><ActivityIndicator size="large"color="#0000ff"/><ActivityIndicator size="small"color="#00ff00"/><ActivityIndicator size="large"color"#0000ff"/><ActivityIndicator size="small"color="00ff00"/></View>)}} const styles=StyleSheet.create({container:{flex:1,justifyContent: 'center'},horizontal:{flexDirection: 'row',justifyContent:'space-around',padding:10}})

Messtone machines ty...

SRV1

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getDOMAIN ssh onto SRV1`[deployment@SRV1]$ pack.sh -managed=true-domainmesstone=$DOMAINMESSTONE-template=/temp/template.jar -template_nameMesstone="/tmp/template_nameMesstone"<<read domainMesstone from${MW_HOME} succeed: read domainMesstone from${MW_HOME}<<set config option Managed to "true"succeed:set config option Managed to "true"<<write template to "/tmp/template.jar".............................>>succeed:write template to "/tmp/template.jar"<<close template succeed close template[deployment@SRV1 base_domainMesstone]$ the Pack file from SRV1 to SRV2[deployment@SRV2 base_domainMesstone]$ scp /tmp/template.jar deployment@ SRV2:/tmp/.upPack the domain onto SRV2`[deployment@SRV2 Oracle_HOME]$ java -version java version "1.8.0_121" Java(TM) SE Runtime Environment(build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM(build 25.121-b13,mixed mode)[deployment@SRV2 ORACLE_HOME]$ export DOMAIN=${MW_HOME}[deployment@SRV2 ORACLE_HOME]$ unpack.sh -domainmesstone=$DOMAINMESSTONE-template=/tmp/template.jar<<read template from "/tmp/template.jar"succeed: read template from "/tmp/template.jar"<<set config option DomainNameMesstone to " base_domainmesstone"succeed:set config option DomainNameMesstone to "base_domainmesstone"ValidateConfig "KeyStorePasswords"succeed:ValidateConfig "KeyStorePasswords"<<write DomainMesstone to ${MW_HOME}...............................<<close template succeed:close template[deployment@SRV2 Oracle_HOME]$ Start theNodeManaged on SRV2:[deployment@SRV2 bin]$ pwd ${MW_HOME}/bin [deployment@SRV2 bin]$ nohup ./startManagedWebLogic.sh second_server_nameMesstone admin_url&[1] 10632[deployment@SRV2jb bin]$

Messtone machines type...

WebLogic

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.get{$MW_HOME} WebLogic Server home directory.[deployment@SRV1 nodemanager]$ pwd ${MW_HOME}/userMesstone_project/domainsMesstone/base_domainMesstone/nodemanager[deployment@SRV1 nodemanager]$ vi nodemanager.properties Set the ListenAddreas=SRV1 www.messtone.com: Start the WebLogic console:[deployment@SRV1 bin]$ pwd ${MW_HOME}/userMesstone_project/domains Messtone/base_domainMesstone/bin[deployment@SRV1 bin]$ nohup ./startWebLogic.sh&[1] 7820 [deployment@SRV1 bin]$ Start Node Manager:[deployment@SRV1 bin]$ pwd ${MW_HOME}/bin [deployment@SRV1 bin]$ nohup ./startNodeManager.sh&[2] 7991 [deployment@SRV1 bin]$ Login to the WebLogic Console: http://SRV1.messtone.com:7001/console/login/LoginForm.jsp.To create a domain pack,in SRV1 update as follows:[deployment@SRV1 ORACLE_HOME]$ java-version java version "1.8.0_121" Java(TM) SE Runtime Environment(build 1.8.0_121-b13) Java HotSpot(TM) 64-Bit Server VM(build 25.121-b13,mixed mode)[deployment@SRV1]$ export PATH=${MW_HOME}/oracle_common/commm/bin:$PATH[deployment@SRV1]$ export DOMAINMESSTONE=${MW_HOME}

Messtone machines type...

Browser

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getLive Tail in MesstoneBrowser`Match Regex= .*·Match Regex= ERROR·Match Regex= ERROR | DEBUG·Considers the two log event snippets`X-Real-IP: 54.173.157.5,X-Forwarded-For:54.173.157.5,Content-Type: application/json,tag:....} X-Real-IP:54.173.157.5,X-Forwarded-For:54.173.157.8,Content-Type: application/json,tag:....} Live Tail: curl -O 'https://www.loggly.com/install/tailclientMesstone-1.0.3-install.zip' unzip tailclientMesstone-1.0.3-install.zip Messtone should put his Auth token tail.clientMesstone.authtoken=</AUTHTOKEN> Live Tail installation directory using:cd bin/ ./livetail -m<matcher pattern> -i<ignore pattern> ./livetail -m '.*' ./livetail -m 'ERROR' ./livetail -m 'ERROR | DEBUG' ./livetail -m 'ERROR' -i 'DEBUG' ./livetail -m '.*' | grep 'level'

Messtone machines type...

LiveTail

robertharper616@cloudshell:~(messtone-161906)$Messtonebase64.getLive Tail on Windows.PowerShell only use: curl 'https://www.loggly.com/install/tailclientMesstone-1.0.2/install.zip' -Outfile tailclientmesstone-install.zip #Messtone should put his auth token tail.client.auth token=</AUTHTOKEN>base operations live tail install directory using cd bin .livetail.bat -m<matcher pattern> -i<ignore pattern> see entire data stream .livetail.bat -m ".*" .livetail.bat -m "ERROR" .livetail.bat -m "ERROR | DEBUG" .livetail.bat -m "ERROR" -i "DEBUG" Messtone Live Tail Interactive Command./################Loggly Live Tail: Now in Command Mode.To get in Data mode type/again.Type/help to see help/help######################Loggly Live Tail Command Help To stop tail type "/"to enter in command mode or Data mode To stop tail type"/stop" To start tail type"/start" To pause tail type"/pause" To unpause tail type"/unpause" To show matcher type"/show matcher" To unpause tail type"/show ignore"########################conf/livetail.properties: tail.clientMesstone.im.url=https://api.hipchat.com/v2/room/<HIPCHAT ROOM API ID>Messtone/notification?auth_token=<HIPCHAT AUTHORIZATION TOKEN> Webhook URL: http:s://hooks.slack.com/services/T00000000/B00000000/ABcdefGHIjklmnOPQRstuvWX·conf/livetail.properties: tail.clientMesstone.url=https://hooks.slack.com/services/T00000000/B00000000/ABcdefGHIjklmnOPQRstuvWX

Messtone machines type...