Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

38 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Twitter Clone Case Study

Twitter is a root folder of Eclipse project that builds a WAR file (intuit.war). See build/build.xml file inside the project.

The WAR file can be deployed on J2EE server like Tomcat.

The web application requires LDAP server, and Redis to be available.

LDAP is configured by specifying LDAP_URL property. Either Java system property or JNDI (context.xml on tomcat). Also LDAP_PRINCIPAL_TEMPLATE property (System or JNDI) can be used to specify LDAP user search base. If one is not provided the default cn={0},dc=example,dc=org will be used. Value inside {0} is the ID used to login into the application.

Redis is configured by specifying REDIS_HOST property. Either Java system property or JNDI (context.xml on tomcat). Also REDIS_PORT property (System or JNDI) can be used to specify Redis port. If one is not provided the default 6379 will be used.

Sample environment properties defined in Tomcat's conf/context.xml:

 <Environment name="TWITTER_TYPE" value="REDIS"  type="java.lang.String"/>  <!-- MEMORY or REDIS -->
 <Environment name="REDIS_HOST" value="192.168.99.100" type="java.lang.String"/> 	
 <Environment name="IDENTITY_SOURCE_TYPE" value="LDAP" type="java.lang.String"/> <!-- LDAP or DUMMY -->	
 <Environment name="LDAP_URL" value="ldap://192.168.99.100:389"  type="java.lang.String"/>
 <Environment name="LDAP_PRINCIPAL_TEMPLATE" value="cn={0},dc=example,dc=org"  type="java.lang.String"/>
 <Environment name="PAGE_SIZE" value="100"  type="java.lang.String"/>	
 <Environment name="INACTIVITY_TIMEOUT" value="1800"  type="java.lang.String"/>	
 <Environment name="MAXIMUM_TIMELINE_SIZE" value="1000"  type="java.lang.String"/>

Once the web application is up and running it can be accessed by going to root location. Either based on war file name of based on a location specified specifically for it (Server.xml in Tomcat). For example https://52.52.230.64:8443/. Users will only be able to login using valid credential of users from LDAP. For REST documentation the relative url is twitter. For example https://52.52.230.64:8443/twitter

AWS Demo

Working example is provided on AWS. It consists of:

  1. Ubuntu EC2 instance with Tomcat installed. Application is deployed on Tomcat. Location is https://52.52.230.64:8443/
  2. Amazon Linux EC2 instance on which Docker is installed. Open LDAP, and LDAP admin UI containers are hosted on Docker. LDAP admin UI is https://52.8.60.149:6443/
  3. Redis from Amazon's ElastiCache service.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages